@import "./bootstrap/bootstrap";
@import "./mixins";
@import "./vars";

@import "./general/dashboard";
@import "./general/navigation";
@import "./manage/categories";
@import "./manage/tags";
@import "./manage/flags";
@import "./manage/users";
@import "./appearance/customise";
@import "./appearance/themes";
@import "./extend/plugins";
@import "./extend/rewards";
@import "./advanced/database";

@import "./modules/alerts";
@import "./modules/selectable";
@import "./modules/checkboxes";

.admin {
	padding-top: 70px;
	background: #f0f0f0;

	.container {
		width: 100% !important;
		padding: 0px 15px;
	}

	.jumbotron {
		padding: @jumbotron-padding;
	}

	.btn {
		border-radius: 0;
	}

	.user-img {
		width:24px;
		height:24px;
	}

	.nodebb-logo {
		img {
			height: 31px;
			margin-top: -8px;
			margin-left: -7px;
			vertical-align: -43%;
		}

		.box-header-font;
		color: #fff;
	}

	&.mobile {
		#content {
			padding-left: 20px;
		}

		#main-menu {
			width: 200px;
			height: 100%;


			-webkit-transform: translateX(-190px);
    		transform: translateX(-190px);

			&.transitioning {
				.transition(.3s ease all);
			}

			&.open {
				-webkit-transform: translateX(0);
    			transform: translateX(0);
			}
		}
	}


	#main-menu {
		position: fixed;
		width: 200px;
		height: 100%;
		padding-top: 50px;
		top: 0px;
		left: 0px;
		background: url();
		z-index: 1;
		overflow-y: auto;

		.nano-content {
			top: 51px !important;
		}

		.sidebar-nav {
			overflow: hidden;
			.transition(.4s ease-in-out max-height);
			max-height: 100%;
			cursor: pointer;
			max-height: 38px;

			&.open {
				max-height: 500px;
			}

			.nav-header {
				color: #fff;
				border-top: 1px solid #32353E;
				border-bottom: 1px solid #1A1C20;
				background-color: #272727;
				text-shadow: 0px 0px 2px #111;
				padding: 10px;
				.user-select(none);
			}

			.nav-list {
				background: #232323;

				li {
					i {
						margin-right: 6px;
					}

					&:hover a {
						background-color: #3f3f3f;

						span {
							opacity: 0.8;
						}
					}

					&.active a {
						padding-left: 20px;
						background-color: #3f3f3f;

						span {
							opacity: 0;
						}
					}

					a {
						color: white;
						padding: 7px 15px;
						font-size: 13px;
						padding-left: 11px;
						outline: 0;

						span {
							opacity: 0;
							margin-right: -8px;
							.transition(.3s ease-in opacity);
						}

						-webkit-transition: background-color .3s ease-in, padding-left .3s ease-in;
						   -moz-transition: background-color .3s ease-in, padding-left .3s ease-in;
						     -o-transition: background-color .3s ease-in, padding-left .3s ease-in;
						        transition: background-color .3s ease-in, padding-left .3s ease-in;
					}
				}
			}
		}
	}

	#content {
		padding-left: 215px;
		padding-right: 15px;
	}

	#breadcrumbs {
		cursor: default;
	}

	.wrapper {
		width: 100%;
		overflow-y: hidden;
	}

	.acp-panel-heading {
		padding: 7px 14px;
		border: 0;
		.box-header-font;
	}

	.panel {
		background-color: #FFF;
		box-sizing: border-box;
		border-radius: 3px;
		box-shadow: 0px 1px 3px 0px rgba(165, 165, 165, 0.75);
		margin-bottom: 20px;

		&.panel-default .panel-heading {
			.acp-panel-heading;
			background: #fefefe;
			color: #333;
		}

		&.panel-danger .panel-heading {
			.acp-panel-heading;
		}
	}

	.nav-header {
		.box-header-font
	}

	#user_label {
        a {
            padding-top: 13px;
            padding-bottom: 13px;

            img {
                width: 24px;
                height: 24px;
                border-radius: 50%;
                border: 1px solid #454;
            }
        }
	}

	.icon-container {
		.row {
			margin: 0;
			i {
				width:20px;
				height:20px;
				margin: 1px;
				.pointer;
				line-height: 20px;
				text-align: center;

				&:hover, &.selected {
					background: black;
					color: white;
				}
			}
		}
	}

    .navbar-static-top, .navbar-fixed-top {
        box-shadow: 0px -3px 12px rgba(0, 0, 0, 0.5);
    }

    .navbar-header > .navbar-toggle {
        margin-right: 8px;
    }

    .navbar-nav {
        margin-top: 0;
        margin-bottom: 0;

        >li {
            >a {
                padding-top: 15px;
                padding-bottom: 15px;
            }

            >a:hover, >a:focus {
                color: @gray-dark;
                background-color: @gray-light;
            }

            >#reconnect {
                color: @gray-light;
            }

            >#reconnect:focus, >#reconnect:hover {
                color: @gray-light;
                background-color: transparent;
            }
        }
    }

	#acp-search {
		input {
			background: black;
			border: 0;
			color: white;
			box-shadow: none;
			.transition(.4s ease width);
			font-family: @font-family-monospace;
			width: 30px;
			height: 30px;
			vertical-align: -30%;
			border-radius: 0;

			&:focus {
				width: 200px;
			}
		}

		.search-match {
			font-weight: 700;
			color: black;
		}
	}

	#taskbar {
		display: none; /* not sure why I have to do this, but it only seems to show up on prod */
	}

	/* Allows the autocomplete dropbox to appear on top of a modal's backdrop */
	.ui-autocomplete {
		z-index: @zindex-popover;
	}
}

// Allowing text to the right of an image-type brand
// See: https://github.com/twbs/bootstrap/commit/8e2348e9eda51296eb680192379ab37f10355ca3
.navbar-brand > img {
  display: inline-block;
}

@media (min-width: 1200px) {
	.acp-sidebar {
		position: fixed;
		top: 70px;
		right: 15px;
		width: initial;
		max-width: calc( ~"(100% - 200px)/4" );
	}
}

.category-settings-form {
	h3 {
		margin-top: 0;
		.pointer;
	}

	h4 {
		.pointer;
	}
}

.category-preview {
	.pointer;
	width: 100%;
	height: 100px;
	text-align: center;
	color: white;
	margin-top: 0;

	.icon {
		width: 30px;
		height: 30px;
		line-height: 40px;
		display: inline-block;
		margin: 35px 5px 0 5px;
	}
}

.table-reordering {
	tr:hover {
		cursor: move;
	}
}

.privilege-table {
	th {
		font-size: 10px;
	}

	img {
		max-width: 24px;
		max-height: 24px;
	}
}